// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addTest POST /api/test/add */
export async function addTestUsingPost(body: API.TestAddRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseLong_>('/api/test/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** correctTest POST /api/test/correct */
export async function correctTestUsingPost(
  body: API.TestSubmitUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/test/correct', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteTest POST /api/test/delete */
export async function deleteTestUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/test/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** editTest POST /api/test/edit */
export async function editTestUsingPost(
  body: API.TestEditRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/test/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getTestById GET /api/test/get */
export async function getTestByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTestByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTest_>('/api/test/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** getTestVOById GET /api/test/get/vo */
export async function getTestVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTestVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTestVO_>('/api/test/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listTestByPage POST /api/test/list/page */
export async function listTestByPageUsingPost(
  body: API.TestQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTest_>('/api/test/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listTestVOByPage POST /api/test/list/page/vo */
export async function listTestVoByPageUsingPost(
  body: API.TestQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTestVO_>('/api/test/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listMyTestSubmitVOByPage POST /api/test/my/submit/list/page/vo */
export async function listMyTestSubmitVoByPageUsingPost(
  body: API.TestQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTestSubmitVO_>('/api/test/my/submit/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** reviewTest POST /api/test/review */
export async function reviewTestUsingPost(
  body: API.TestUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/test/review', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** submitTest POST /api/test/submit */
export async function submitTestUsingPost(
  body: API.TestSubmitAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/test/submit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getTestSubmitVOById GET /api/test/submit/get/vo */
export async function getTestSubmitVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTestSubmitVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseTestSubmitVO_>('/api/test/submit/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listTestSubmitVOByPage POST /api/test/submit/list/page/vo */
export async function listTestSubmitVoByPageUsingPost(
  body: API.TestQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTestSubmitVO_>('/api/test/submit/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** updateTest POST /api/test/update */
export async function updateTestUsingPost(
  body: API.TestUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/test/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
